package com.j48.entrancegurad.mapper;

import com.j48.entrancegurad.model.Host_openid;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface WxMapper {
    /**
     * 查询全部用户的openID
     * @param openid 唯一标识符
     * @return 查询结果
     */
    @Select("select * from `host_openid` where openid=#{openid}")
    public Host_openid SelectOpenId(Host_openid openid);

    /**
     * 添加用户openID
     * @param openid 唯一标识符
     * @return 影响数据库数据条数
     */
    @Insert("insert into `host_openid`(openid) values (#{openid})")
    public int InsertOpen(Host_openid openid);
}
